/**
 * 根据用户发送的消息类型和内容，返回不同内容
 */
module.exports = message => {
    let options = {
        toUserName: message.FromUserName,
        fromUserName: message.ToUserName,
        createTime: Date.now(),
        msgType: ''
    }
    let content = '???'
    if(message.MsgType === 'text') {
        options.msgType = 'text'
        // 全匹配
        if(message.Content === '1') {
            content = '666'
        }
        // 半匹配
        if(message.Content.match('88')) {
            content = '88'
        }
    }else if(message.MsgType === 'image') {
        options.msgType = 'image'
        options.mediaId = message.MediaId
    }else if(message.MsgType === 'voice') {
        options.msgType = 'voice'
        options.mediaId = message.MediaId
    }else if(message.MsgType === 'location') {
        content =  `纬度：${message.Location_X} 经度：${message.Location_Y} 位置信息：${message.Label}`
    }
    if(message.Event === 'subscribe') {
        content = '欢迎您的关注~'
    }else if(message.Event === 'CLICK') {
        
    }

    options.content = content
    return options
}